package com.gao.domain;

//ע�⣺ʱ��util���е�Date
import java.util.Date;

public class OrderProduct {
	private int opid;
	private Order order;//private User user;ӦΪ��������uid��Ϣ�����Դ˴����Բ�����
	private int pid;
	private String pname;
	//ע����Ʒ�ļ۸���һ�ɲ��䣬�����ڹ���ʱӦ�ü�¼����ʱ����Ʒ��Ϣ
	private double price;
	private int cartNum;
	private Date createTime;
	
	public OrderProduct(Order order, int pid, String pname, double price, int cartNum) {
		super();
		this.order = order;
		this.pid = pid;
		this.pname = pname;
		this.price = price;
		this.cartNum = cartNum;
	}

	public OrderProduct(int opid, Order order, int pid, String pname, double price, int cartNum, Date createTime) {
		super();
		this.opid = opid;
		this.order = order;
		this.pid = pid;
		this.pname = pname;
		this.price = price;
		this.cartNum = cartNum;
		this.createTime = createTime;
	}

	@Override
	public String toString() {
		return "OrderProduct [opid=" + opid + ", order=" + order + ", pid=" + pid + ", pname=" + pname + ", price="
				+ price + ", cartNum=" + cartNum + ", createTime=" + createTime + "]";
	}

	public int getOpid() {
		return opid;
	}

	public void setOpid(int opid) {
		this.opid = opid;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public int getPid() {
		return pid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public String getPname() {
		return pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public int getCartNum() {
		return cartNum;
	}

	public void setCartNum(int cartNum) {
		this.cartNum = cartNum;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	
}
